home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
comm
/
net
/
amitcp2_x_gcc.lha
/
RCS.RCSfiles
/
sana2perror.c,v
< prev
next >
Wrap
Text File
|
1994-01-12
|
2KB
|
123 lines
head 1.3;
access;
symbols;
locks
jasegler:1.3; strict;
comment @ * @;
1.3
date 94.01.12.18.38.06; author jasegler; state Exp;
branches;
next 1.2;
1.2
date 94.01.11.20.06.22; author jasegler; state Exp;
branches;
next 1.1;
1.1
date 94.01.11.19.34.21; author jasegler; state Exp;
branches;
next ;
desc
@@
1.3
log
@*** empty log message ***
@
text
@char RCS_ID_SANA2PERROR_C[] = "$Id: sana2perror.c,v 1.2 1994/01/11 20:06:22 jasegler Exp jasegler $";
/*
* sana2perror.c --- print SANA-II error message
*
* Author: ppessi <Pekka.Pessi@@hut.fi>
*
* Copyright © 1993 AmiTCP/IP Group, <amitcp-group@@hut.fi>
* Helsinki University of Technology, Finland.
* All rights reserved.
*
* Created : Sat Mar 20 02:10:14 1993 ppessi
* Last modified: Sun Jun 13 03:17:42 1993 ppessi
*/
#ifdef KERNEL
/*
* Note: This file is to be recompiled with AmiTCP/IP proper
* with preprocessor symbol KERNEL defined.
* You should NOT link it directly from "net.lib"!
*/
#include <conf.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/syslog.h>
#define fprintf log
#define stderr LOG_ERR
#else
#include <stdio.h>
#endif
#include <devices/sana2.h>
#include <net/sana2errno.h>
void
sana2perror (const char *banner, struct IOSana2Req *ios2)
{
register WORD err = ios2->ios2_Req.io_Error;
register ULONG werr = ios2->ios2_WireError;
const char *errstr;
if (err >= sana2io_nerr || -err > io_nerr)
{
errstr = io_errlist[0];
}
else
{
if (err < 0)
/* Negative error codes are common with all IO devices */
errstr = io_errlist[-err];
else
/* Positive error codes are SANA-II specific */
errstr = sana2io_errlist[err];
}
if (werr == 0 || werr >= sana2wire_nerr)
{
fprintf (stderr, "%s: %s\n", banner, errstr);
}
else
{
fprintf (stderr, "%s: %s (%s)\n", banner, errstr, sana2wire_errlist[werr]);
}
}
@
1.2
log
@*** empty log message ***
@
text
@d1 1
a1 1
char RCS_ID_C[] = "$Id: sana2perror.c,v 1.1 1994/01/11 19:34:21 jasegler Exp jasegler $";
@
1.1
log
@Initial revision
@
text
@d1 1
a1 1
RCS_ID_C = "$Id: sana2perror.c,v 1.4 1993/06/13 00:18:09 ppessi Exp $";
d19 1
a19 1
* You should NOT link it directly from "net.lib"!
@